class ZonaDifferenziata < ActiveRecord::Base
  acts_as_paranoid unless SHOW_DELETED
    has_attached_file :immagine, :whiny => false,
    :styles => { :medium => "320x240>", :thumbnail => [ "60x60>", :jpg ] }

  has_many :civici_differenziata, :dependent => :protect, :class_name => "CivicoDifferenziata"
  has_many :note, :as => :nota_ref, :dependent => :protect
  
  validates_presence_of :name
   validates_attachment_content_type :immagine, :content_type => ['image/jpeg', 'image/png', 'image/tiff']
  validates_attachment_size :immagine, :less_than => 3.megabytes
end
